package com.jkl.entity.drTable;

import java.util.List;

import javax.persistence.*;

import com.jkl.entity.bsWorkflow.BsWorkflow;
import com.jkl.entity.dept.BSDept;
import com.jkl.entity.drIndex.DrIndex;
import com.jkl.entity.drIndexFormula.DrIndexFormula;
import com.jkl.entity.drTableDetail.DrTableDetail;
import com.jkl.entity.drTemplate.DrTemplate;
import com.jkl.entity.person.BsPerson;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@Table(name = "dr_table")
public class DrTable {
    /**
     * 主键ID，唯一
     */
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY,generator="Mysql")
    @Column(name = "row_id")
    private Integer rowId;

    /**
     * 报表周期，如201901
     */
    private String period;

    /**
     * 上报部门（或单位）ID，关联bs_dept.row_id
     */
    @Column(name = "dept_id")
    private Integer deptId;

    /**
     * 模板表ID，关联dr_template.row_id
     */
    @Column(name = "template_id")
    private Integer templateId;

    /**
     * 模板表名称，读取dr_template.table_name
     */
    @Column(name = "template_name")
    private String templateName;

    /**
     * 表顺序，读取dr_template.sequence。此处排序为表，时间，部门三个维度组合排序。
     */
    private String sequence;

    /**
     * 关联bs_param表参数
     */
    @Column(name = "workflow_code")
    private String workflowCode;

    /**
     * 操作人员
     */
    @Column(name = "person_id")
    private Integer personId;

    @Column(name = "project_id")
    private Integer projectId;
    /**
     * 操作时间
     */
    @Column(name = "oper_time")
    private String operTime;

    /**
     * 状态：1启用；0停用
     */
    private String status;
    
    @Transient
    private String deptCode;
    
    @Transient
    private Integer level;
    
    @Transient
    private String deptById;
    
    @Transient
    private int pageSize;

    @Transient
    private int currentPage;
    
    @Transient
    private BsPerson bsPerson;
    
    @Transient
    private BSDept bsDept;
    
    @Transient
    private DrTemplate drtemplate;
    
    @Transient
    private BsWorkflow bsWorkflow;
    
    @Transient
    private int workflowNode;
    
    @Transient
    private List<BSDept> checkNode;
    
    @Transient
    private String tableCycle;
    @Transient
    private String deptCodeTemp;
    @Transient
    private String areaId;
    @Transient
    private String deptName;
    @Transient
    private Integer oldRowId;
    //临时属性变量
    @Transient
    private String startDate;//开始时间
    @Transient
    private String endDate;//结束时间
    
    @Transient
    private List<DrTableDetail> drTableDetailList;
}